/*
 * Typedefs.h
 *
 *  Created on: Jan 23, 2013
 *      Author: Lucifer
 */

#ifndef __BFX_TYPES_H__
#define __BFX_TYPES_H__

namespace BFX
{

#ifndef __BFX_MINMAX__
#define	__BFX_MINMAX__

#ifndef __MAX
#define __MAX(a,b)            (((a) > (b)) ? (a) : (b))
#endif

#ifndef __MIN
#define __MIN(a,b)            (((a) < (b)) ? (a) : (b))
#endif

#endif  /* __BFX_MINMAX__ */

#define	INOUT
#ifndef	_MSC_VER
#define	OUT
#endif

#ifdef	_WIN32

#ifdef	BFX_DLL_BUILD

#ifdef	_USRDLL
#define	BFX_API	__declspec(dllexport)
#define BFX_TMPL __declspec(dllexport)
#else	//	_USRDLL
#define	BFX_API	__declspec(dllimport)
#define	BFX_TMPL
#endif	//	_USRDLL

#else	//	BFX_DLL_BUILD

#define	BFX_API
#define	BFX_TMPL

#endif	//	BFX_DLL_BUILD

#else	//	_WIN32

#define	BFX_API
#define	BFX_TMPL

#ifndef	__CYGWIN__
#define	__cdecl
#endif

typedef char INT8;
typedef unsigned char UINT8;
typedef short INT16;
typedef unsigned short UINT16;
typedef int INT32;
typedef unsigned int UINT32;
typedef	long long INT64;
typedef	unsigned long long UINT64;

typedef UINT8 BYTE;
typedef UINT16 WORD;
typedef UINT32 DWORD;

typedef int	INT;
typedef	unsigned int UINT;
typedef	long	LONG;
typedef	unsigned long	ULONG;
typedef	void*	HANDLE;

typedef const char*	PCSTR;

#endif	// _WIN32

}	//	namespace BFX

#endif /* __BFX_TYPES_H__ */
